package ink.tiptop.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * @author ink.tiptop.zjf
 * @Title: Ticket
 * @Package ink.tiptop.enums
 * @Description:
 * @date 2020-07-22 16:06
 */
public enum EConnectionWay {
    PASS(0,"密码"),
    KEY(1,"公钥");

    private Integer code;
    private String msg;

    EConnectionWay(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private static final Map<Integer, EConnectionWay> map = new HashMap<>(EConnectionWay.values().length);

    static {
        for (EConnectionWay value : EConnectionWay.values()) {
            map.put(value.code, value);
        }
    }

    public static EConnectionWay valueOfMap(Integer code) {
        return map.get(code);
    }
}
